package com.bean;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author: cxt
 * @time: 2022/2/14
 */
@Data
@Component
@ConfigurationProperties(prefix = "test-spring-boot") // 不需要使用@Value("${Xxxx-y.name}") 从配置文件中读取值
public class TestSpringBoot {
    //    @Value("${test-spring-boot.name}")
    private String name;
    //    @Value("${test-spring-boot.age}")
    private Integer age;
    //    @Value("${test-spring-boot.six}")
    private Integer six;
    //    @Value("${test-spring-boot.address}")
    private String address;
}
